Finance API
Overview
This page covers the methods and endpoints associated with finance operations. With the Finance API you can access and manage VLD fees.
Authentication
Use the following header parameters for all requests:
| Headers | |
|---|---|
Authentication string required | Authentication bearer token See Authentication Guide |
X-IAA-OW-ID integer required | Organization Workspace ID Header |
Finance Details
Get Customer VLD Finance Details
GET /api/v3/fa/customer/{customerOwId}/vld-feesGet finance details for a Customer's Voter Level Data (VLD).
Read more about VLD in our Insights API or our Help Center articles: Voter Level Data (VLD) Insights Reports.
| Path Parameters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
id integer | Customer ID |
owId integer | Organization Workspace ID |
vldRate integer | VLD rate for workspace Customer |
vldEnabled boolean | Boolean flag to enable and disable VLD feature for Advertiser Customer |
vldMarkupTypeId integer | VLD markup type ID: "Absolute" or "Percentage" |
vldMarkupType integer | VLD markup type: "Absolute" or "Percentage" |
vldMarkupValue integer | VLD markup value for Advertiser Customer |
- JSON
- TypeScript
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
vldRate: number;
}
}
};
};
}
function getVLDFees(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/{customerOwId}/vld-fees',
params: {
path: {
customerowId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer VLD Details
PATCH /api/v3/fa/customer/vld-feesUpdate a Customer's VLD details.
| Request Schema | |
|---|---|
idinteger | ID |
owId integer required | OW ID of the Customer to update details |
vldRate integer | VLD rate for workspace Customer |
vldEnabled boolean | Boolean flag to enable and disable VLD feature for Advertiser Customer |
vldMarkupTypeId integer | VLD markup type: "Absolute" or "Percentage" |
vldMarkupType string | VLD markup type: "Absolute" or "Percentage" |
vldMarkupValue integer | VLD markup value for Advertiser Customer |
Response Properties
id integer | ID |
message string | Success message |
- JSON
- TypeScript
Request Sample
{
"id": 0,
"owId": 0,
"vldRate": 0,
"vldEnabled": true,
"vldMarkupType": "string",
"vldMarkupTypeId": 0,
"vldMarkupValue": 9999
}
Response 200
{
"success": true,
"data": {
"id": 1,
"message": "VLD Rate updated successfully. The new rate applies only to newly created VLDs"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
id: number;
owId: number;
vldRate: number;
vldEnabled: boolean;
vldMarkupType: string;
vldMarkupTypeId: number;
vldMarkupValue: number;
}
};
};
}
function editVLDFees(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/vld-fees',
requestBody: {
content: {
"application/json": {
id?: `number`,
owId: `number`,
vldRate?: `number`,
vldEnabled?: `boolean`,
vldMarkupType?: `string`,
vldMarkupTypeId?: `number`,
vldMarkupValue?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}